//
//  VEHomeCustomNavigationView.m
//  VEMoneyPorject
//
//  Created by 陈建 on 2018/9/27.
//  Copyright © 2018年 陈建. All rights reserved.
//

#import "VEHomeCustomNavigationView.h"

@implementation VEHomeCustomNavigationView



-  (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        
        [self setupSubViews];
    }
    return self;
}

- (void)setupSubViews{
    UIView *backView = [[UIView alloc] initWithFrame:self.bounds];
    backView.backgroundColor = kCommonRedColor;
    [self addSubview:backView];
    
    UIView *topView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, Height_StatusBar)];
    topView.backgroundColor = [UIColor clearColor];
    [backView addSubview:topView];
    UIView *bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(topView.frame), kScreenWidth, Height_NavContentBar)];
    bottomView.backgroundColor = [UIColor clearColor];
    [backView addSubview:bottomView];
    
    UIImageView *imgV = [[UIImageView alloc] init];
    imgV.image = IMG(@"VE_logo");
    imgV.layerCornerRadius = 6;
    [bottomView addSubview:imgV];
    [imgV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(bottomView);
        make.height.width.equalTo(@28);
        make.centerX.equalTo(bottomView).offset(-16);
    }];
    
    UILabel *titLable = [[UILabel alloc] init];
    titLable.textColor = [UIColor whiteColor];
    titLable.font = kFont(16.f);
    titLable.text = @"VE财经";
    [bottomView addSubview:titLable];
    [titLable mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(bottomView);
        make.left.equalTo(imgV.mas_right).offset(4);
    }];
}

@end
